package com.obook.bln;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.View;

import com.obook.epdhelper.EPDHelper;

public class GC16Activity extends AppCompatActivity {

    private static final String TAG = GC16Activity.class.getSimpleName();

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_gc16);
    }

    @Override
    public void onAttachedToWindow() {
        super.onAttachedToWindow();
        Log.d(TAG, "onAttachedToWindow: ");

        // window并未获得焦点
    }

    @Override
    public void onWindowFocusChanged(boolean hasFocus) {
        super.onWindowFocusChanged(hasFocus);

        if (hasFocus) {
            Log.d(TAG, "onWindowFocusChanged: ");
            EPDHelper.getInstance().forceGLobalRefresh(getWindow(), true);
        }
    }

    public void onFinish(View view) {
        finish();
    }

    public void onTest(View view) {
    }
}
